import axios from 'axios'

const service = axios.create({
  baseURL: 'http://rap2.taobao.org:38080/app/mock/259857'
})

service.interceptors.response.use(config => {
  if (config.status === 200 && config.data.res_code === 0) {
    return config.data.res_body
  }

  return Promise.reject(config)
})

export default service
